using System;
using System.Collections.Generic;
using System.Text;
using FireStarter.Base;
using FireStarterModeller.BO;

namespace FireStarter.CodeGeneration
{
    public class BoProjectTemplateLoader : TemplateLoader
    {
        public string GetBroker(string projectName, string applicationName)
        {
            const string fileName = "";
            string fileContents;
            if (!loadFromFile(fileName, out fileContents))
            {
                fileContents = Templates.BO_Broker_cs;
            }
            fileContents = fileContents.Replace("<<PROJECT_NAME>>", projectName);
            fileContents = fileContents.Replace("<<APPLICATION_NAME>>", applicationName);
            return fileContents;
        }

        public string GetBoClass_Generated(string namespaceName, string boProjectName, IModelClass dmClass)
        {
            const string fileName = "";
            string fileContents;
            if (!loadFromFile(fileName, out fileContents))
            {
                fileContents = Templates.BO_Generated;
            }

            return GetGeneratedTemplate(fileContents, dmClass);
        }

        public string GetBoClass_Main(string namespaceName, string boProjectName, IModelClass dmClass)
        {
            const string fileName = "";
            string fileContents;
            if (!loadFromFile(fileName, out fileContents))
            {
                fileContents = Templates.BO_Main;
            }

            return GetGeneratedTemplate(fileContents, dmClass);
        }
    }
}
